Skip to content

[SM6.10] Track LinAlg shader feature usage - #8884

Merged
Ashley Coleman (V-FEXrt) merged 3 commits into
microsoft:mainfrom
V-FEXrt:linalg-psv0-shader-flags
Sep 9, 2026
Merged

[SM6.10] Track LinAlg shader feature usage#8884
Ashley Coleman (V-FEXrt) merged 3 commits into
microsoft:mainfrom
V-FEXrt:linalg-psv0-shader-flags

Conversation

@V-FEXrt

@V-FEXrt Ashley Coleman (V-FEXrt) commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Set ShaderFeatureInfo_LinearAlgebra whenever a shader uses LinAlg operations and update validation tests with the required feature metadata.

Part of #7843

This doesn't fill in the detailed usage data, instead it only sets the feature info flag with LinAlg usage is detected

Co-authored-by: Copilot [email protected]

Set ShaderFeatureInfo_LinearAlgebra whenever a shader uses LinAlg operations and update validation tests with the required feature metadata.

Co-authored-by: Copilot <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Moderate metadata and fixture issues must be corrected before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds SM 6.10 Linear Algebra usage tracking to shader flags, RDAT metadata, and validation fixtures.

Changes:

  • Detects LinAlg DXIL operations.
  • Defines and emits Linear Algebra feature metadata.
  • Updates validation fixtures across operations and shader stages.

Unresolved findings include incomplete feature enumeration, a missed invalid fixture, lost precision flags in two fixtures, and missing RDAT/compiler tests and release-note coverage.

File summaries
File Description
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-vectoraccumulatetodescriptor.ll Updates vector-accumulation metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-undef-param.ll Updates undefined-parameter metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-vs.ll Updates vertex-stage metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-raygeneration.ll Updates ray-generation metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-ps.ll Updates pixel-stage metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-node.ll Updates node-stage metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-ms.ll Updates mesh-stage metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-miss.ll Updates miss-stage metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-intersection.ll Updates intersection-stage metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-hs.ll Updates hull-stage metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-gs.ll Updates geometry-stage metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-ds.ll Updates domain-stage metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-cs.ll Updates compute-stage metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-closesthit.ll Updates closest-hit metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-callable.ll Updates callable-stage metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-as.ll Updates amplification-stage metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-anyhit.ll Updates any-hit metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-outerproduct.ll Updates outer-product metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-non-thread-ops.ll Updates non-thread-operation metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-max-k-dim.ll Updates maximum-dimension metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matvecmuladd.ll Updates matrix-vector multiply-add metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matvecmul.ll Updates matrix-vector multiplication metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixstoretomemory.ll Updates matrix-store metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixstoretodescriptor.ll Updates descriptor-store metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixmultiplyaccumulate.ll Updates multiply-accumulate metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixmultiply.ll Updates matrix-multiplication metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixloadfrommemory.ll Updates memory-load metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixloadfromdescriptor.ll Updates descriptor-load metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixaccumulatetomemory.ll Updates memory-accumulation metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixaccumulatetodescriptor.ll Updates descriptor-accumulation metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixaccumulate.ll Updates matrix-accumulation metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-illegal-component-type.ll Updates invalid-component metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-groupshared-vector-memory.ll Updates groupshared-memory metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-copyconvert.ll Updates copy-conversion metadata.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-convert.ll Updates conversion metadata.
lib/HLSL/DxilPreparePasses.cpp Uses function-based LinAlg detection.
lib/DXIL/DxilShaderFlags.cpp Collects and emits LinAlg usage.
lib/DXIL/DxilOperations.cpp Implements LinAlg function detection.
include/dxc/DxilContainer/RDAT_LibraryTypes.inl Exposes the Linear Algebra RDAT flag.
include/dxc/DXIL/DxilShaderFlags.h Adds Linear Algebra flag accessors.
include/dxc/DXIL/DxilOperations.h Declares the LinAlg function helper.
include/dxc/DXIL/DxilConstants.h Defines the Linear Algebra feature bit.
Review details

Suppressed comments (2)

include/dxc/DxilContainer/RDAT_LibraryTypes.inl:86

  • The new FeatureInfo2 serialization is not covered by the updated .ll validator fixtures, which only exercise raw shader flags. Please add a lib_6_10 RDAT test that checks (LinearAlgebra) on a function using a LinAlg intrinsic, analogous to tools/clang/test/HLSLFileCheck/d3dreflect/rdat_mintarget/sm68_extendedcommandinfo.hlsl.
  RDAT_ENUM_VALUE(LinearAlgebra, 0x2)

lib/DXIL/DxilShaderFlags.cpp:591

  • The changed .ll fixtures manually declare the new bit, but none verifies that compiling HLSL with a LinAlg operation actually emits ShaderFeatureInfo_LinearAlgebra in module and per-function RDAT metadata. Please add a compiler-output test (including a library function/caller case) so regressions in this collection and propagation path are detected.
        if (hlsl::OP::IsDxilOpLinAlgFunc(CI->getCalledFunction()))
          hasLinearAlgebra = true;
  • Files reviewed: 42/42 changed files
  • Comments generated: 5
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread include/dxc/DXIL/DxilConstants.h
Comment thread lib/DXIL/DxilShaderFlags.cpp
Comment thread lib/DXIL/DxilShaderFlags.cpp
Copilot AI review requested due to automatic review settings September 4, 2026 21:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The reviewed changes have no unresolved approval-blocking issues.

Review details
  • Files reviewed: 44/44 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@alsepkow Alex Sepkowski (alsepkow) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

One minor comment, did we miss updating linalgmatrix-no-bitcast1.ll and linalgmatrix-no-bitcast2.ll ? Bother call dx.op.linAlgFillMatrix but weren't updated.

Copilot AI review requested due to automatic review settings September 8, 2026 23:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Compiler-output coverage for direct, transitive, and unrelated library exports is missing.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

lib/DXIL/DxilShaderFlags.cpp:591

  • The validation fixtures only hard-code the new metadata bit, so they do not independently verify that compilation emits it or that per-function library/RDAT propagation is correct. Please add a compiler-output test (following the d3dreflect/rdat_mintarget tests) that checks FeatureInfo2: (LinearAlgebra) for a direct LinAlg user and a transitive caller, while an unrelated export remains unflagged.
  • Files reviewed: 47/47 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@V-FEXrt
Ashley Coleman (V-FEXrt) merged commit c5351df into microsoft:main Sep 9, 2026
12 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants